from rest_framework import serializers
from .models import AdminLog


class AdminLogSerializer(serializers.ModelSerializer):
    admin_username = serializers.CharField(source='admin_user.username', read_only=True)

    class Meta:
        model = AdminLog
        fields = '__all__'
        read_only_fields = ['id', 'admin_user', 'created_at']
